import 'package:flutter/material.dart';

class Topcomp extends StatefulWidget {
  const Topcomp({super.key});

  @override
  State<Topcomp> createState() => _TopcompState();
}

class _TopcompState extends State<Topcomp> {
  @override
  Widget build(BuildContext context) {
    return Container(
      width: double.infinity,
      height: 100,
      color: Colors.yellow,
      child: const Row(
        children: [
          //左
          Expanded(
              child: Row(
            mainAxisAlignment: MainAxisAlignment.spaceAround,
            children: [
              Text('点菜'),
              Text('评价'),
              Text('商家'),
            ],
          )),

          //右
          Expanded(
              child: TextField(
            decoration: InputDecoration(
              hintText: '请输入搜索内容',
              filled: true,
              fillColor: Colors.white,
              prefixIcon: Icon(
                Icons.search,
                size: 20,
                color: Colors.grey,
              ),
            ),
          )),
        ],
      ),
    );
  }
}
